/**
 * mixed：任意类型，强类型
 * any:任意类型,弱类型
 * 
 * @flow
 */

// mixed,强类型
function passMixed(value: mixed) {
    if (typeof value === "string") {
        value.substr(1)
    }
    if (typeof value === number) {
        value * value
    }
}

passMixed(100)
passMixed("string")

// any,弱类型
function passAny(value: any) {
    value.substr(1)

    value * value
}

passAny(100)
passAny("string")